# -*- mode: snippet -*-
# name: Beamer Template (16:9; customized)
# key: beamer
# group: templates
# expand-env: ((yas-indent-line 'fixed))
# --
\documentclass[xcolor={dvipsnames},aspectratio=169]{beamer}
% options: notes,handout; aspectratio=169,1610,149,54,43,32

% Beamer Settings
% set fonts
\usepackage[condensed]{roboto}
\usepackage{charter}
\usefonttheme{serif}
\setbeamerfont{title}{series=\bfseries}
\setbeamerfont{frametitle}{family=\sffamily, series=\mdseries}
\setbeamerfont{framesubtitle}{family=\sffamily,series=\mdseries}
% define colors
\definecolor{mBlack}{HTML}{2c2c2c}
\definecolor{mGray}{HTML}{808080}
\definecolor{mAlert}{HTML}{ce2e84}    % blue{06a1cd};  cyan{2cb3c5}
\definecolor{mColor}{HTML}{06a1cd}    % green{12b28b}; red{ce2e84}
% set beamer elements
\usecolortheme[named=mColor]{structure}
\setbeamercolor{normal text}{fg=mBlack}
\setbeamercolor{alerted text}{fg=mAlert}
\setbeamerfont*{block title}{family=\sffamily, series=\mdseries}
\setbeamerfont*{block body example}{size=\small}
\setbeamercolor*{block title}{fg=mBlack, bg= mColor!80}
\setbeamercolor*{block body}{fg=mBlack, bg= mGray!10}
\setbeamercolor*{block title alerted}{fg=mBlack, bg= mAlert!80}
\setbeamercolor*{block body alerted}{fg=mBlack, bg= mGray!10}
\setbeamercolor*{block title example}{fg=mBlack, bg= mGray!80}
\setbeamercolor*{block body example}{fg=mBlack, bg= mGray!10}
% set layouts
\usepackage{dashrule}
\setbeamertemplate{frametitle}{
  \usebeamerfont{frametitle}\insertframetitle\\[-8pt]
  {\color{mGray}\hdashrule{\textwidth}{1pt}{1pt}}}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number]
\setbeamercolor{footline}{fg=mBlack}
\setbeamerfont{footline}{size=\footnotesize}

% Citations
\usepackage{bibentry}       % use \footnote{\bibentry{}}
\bibliographystyle{apalike} % abbrv;apalike
\newcommand{\footcite}[1]{\footnote{\tiny\bibentry{#1}}}
\newcommand{\textcite}[1]{\footnotetext{\tiny\bibentry{#1}}} % put \footnotemark first
% removing line breaks between title, journal, etc.
\setbeamertemplate{bibliography entry title}{}
\setbeamertemplate{bibliography entry location}{}
\setbeamertemplate{bibliography entry note}{}

% Packages
\usepackage{latexsym, amsmath, amssymb, amsfonts,
            arydshln, mathrsfs, mathtools, upgreek}
\usepackage{graphicx,subcaption,tikz}
  \captionsetup[figure]{textfont=scriptsize,labelfont=scriptsize}
  \setbeamerfont{caption}{size=\scriptsize}
\usepackage{algorithm,algpseudocode}
\usepackage{appendixnumberbeamer}

% Math symbol definitions
% \input{userdef-mathsym}

% PDF info
\hypersetup{
  pdftitle={},
  pdfauthor={Zuogong YUE},
  pdfsubject={IFAC-WC 2017 Presentation},
  pdfcreator={Emacs version 25.1 + AUCTeX version 11.90}}

% Title Page
\title[]{${1:title}}
\subtitle{${2:}}
\author{\small \\\Zuogong Yue$^1$\\\\[1ex] J. Thunberg$^1$, L. Ljung$^2$, J. Goncalves$^1$}
\institute[]{
    \begin{tabular}{ll}
       $^1$ University of Luxembourg, Luxembourg\\\
       $^2$ Link\\"{o}ping University, Sweden
    \end{tabular}}
\date % (optional, should be abbreviation of conference name)
  {\footnotesize 14 July 2016 $\cdot$ MTNS 2016 $\cdot$ Minneapolis, MN}

% Table of Contents before each section
\AtBeginSection[]{
\begin{frame}
  \frametitle{Outline}
  \tableofcontents[currentsection]
\end{frame}
}


\begin{document}

% ---- Title Page ----
\setbeamertemplate{footline}{}     % remove page number
\begin{frame}
  \titlepage
  \nobibliography{./ref/library}   % enable citations by /bibentry/
\end{frame}
\setbeamertemplate{footline}[frame number]   % reset page number
\setcounter{framenumber}{0}


% ---- Main Part ----

$0



% ---- Thanks Frame ----
\section*{Thanks}
\setbeamertemplate{footline}{}  % remove page number

\begin{frame}
    \vspace*{1cm}
    \begin{center}
      {\Huge \bf \textcolor{Magenta}{Thank you!}} \\\
      \bigskip
      \bigskip
      \includegraphics[width=10cm]{figures/unix_happy.jpg}
    \end{center}
\end{frame}

% ---- Appendix ----
% \appendix
% \begin{frame}
%   \frametitle{Appendix: ...}
%
% \end{frame}

% ---- Bibliography ----
% using /bibentry/; adding bibliography as footnote at each page
% include bibtex libraries in the tilepage frame.

\end{document}